<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span>日志管理 <span class="c-gray en">&gt;</span> 短信邮件 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
<form method="post" name="query_order_form"  id="query_order" action="${contextPath}/sms_email/query_sms_eamil_log" >    
   <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />                       
    <div class="text-c">
         <table class="table">
                <tr>
                 	<td style="text-align: right;">日志类型：</td>
                   <td>
                   <span class="select-box radius" style="width:250px">            
          	
                       <select class="select" name="type" id="type" style="width:240px">
                       <#if selectMap??>
					    <#list selectMap?keys as key>
					    <option  <#if smsEmailQuQo.type==key > selected="selected"</#if> value="${key}">${selectMap[key]}</option>
					 	</#list>
					 	</#if>
						</select>
					</span>
                    </td>
                   <td style="text-align: right ;">发送状态：</td>
                   <td>
                   <span class="select-box radius" style="width:250px">            
          	   
                       <select style="width:240px" class="select" name="status" id="status">
                         <#if smsMap??>
					  	<#list smsMap?keys as key>
					    <option <#if smsEmailQuQo.status==key > selected="selected"</#if>  value="${key}">${smsMap[key]}</option>
					 	</#list>
					 	</#if>
						</select>
					</span>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right;">手机号码：</td>
                    <td>
                        <input id="send" value="${smsEmailQuQo.send}" class="input-text  radius" style="width:250px" placeholder="" name="send" type="text">
                    </td>
	            	<td style="text-align: right;">卡号：</td>
                   <td>
                        <input id="mcard" value="${smsEmailQuQo.mcard}" class="input-text  radius" style="width:250px" placeholder="" name="mcard" type="text">
                    </td>
             </tr>
                 <tr>
                 	<td colspan="4" style="text-align: center;">
                 	 <button type="button" class="btn btn-success" onclick="search()" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 查询</button>
           			 <button type="button" class="btn btn-success"   onclick="toEmpty()" ><i class="Hui-iconfont">&#xe665;</i> 重置</button>
                	 </td>
              </tr>
            </table>
           
    </div>
</form>

    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
  
    
    <span class="r">共有数据：<strong> ${pagination.totalCount} </strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr   class="text-c">
          
            <th >卡号</th>
            <th >发送号码 </th>
            <th >操作时间</th>
            <th >状态</th>
            <th >发送次数</th>
            <th >操作</th>
        </tr>
        </thead>
        <tbody>
       <#if pagination.list?? && (pagination.list?size &gt; 0) >
        <#list pagination.list as smslist> 
        	 <tr  class="text-c">
        	 	<td> ${smslist.mcard} </td>
        	 	<td> ${smslist.send} </td>
        	 	<td><#if smslist.updateTime??>  ${smslist.updateTime?datetime}</#if> </td>
        	 	<td> 
        	 		<#list smsMap?keys as key>
					  		<#if smslist.status==key >  ${smsMap[key]} </#if>	
					 	</#list>
        	 	</td>
        	 	<td>${smslist.number}	</td>
        	 	<td> 
        	 	
        	 	<a title="重发" href="javascript:;" onclick="showResResult('${contextPath}',${smslist.id})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a>	
        	 	
        	 	<a title="删除" href="javascript:;" onclick="showDelResult('${contextPath}',${smslist.id})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a>	
        	 	
        	 	<a title="详情" href="javascript:;" onclick="dio_result(${smslist.id})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a>	
        	 	<input type="hidden"  id="sendParamJson${smslist.id}" value='${smslist.content}'>
        	 	<input type="hidden"  id="titleJson${smslist.id}" value='${smslist.title}'>
        	 	<input type="hidden"  id="descriptionJson${smslist.id}" value='${smslist.description}'>
        	 	
        	 	
        	  </td>
        	 </tr>
      </#list>
      </#if>
     </tbody>
    </table>
    <div id="biuuu_city" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>

<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>

<script type="text/javascript">
var path="${contextPath}";

laypage({
    cont: 'biuuu_city',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
          $(page).val(obj.curr);//获取点击的页码
          $(query_order_form).submit();
        }
    }
})  


 function dio_result(id){
	var jsonsendMsg= $("#sendParamJson"+id).val();
	var titleJson= $("#titleJson"+id).val();
	var descriptionJson= $("#descriptionJson"+id).val();
		layer.open({
  		  title: '信息',
  		  maxWidth:400,
  		  maxHeight:400,
  		  content: '<div><b>发送标题:</b>'  +titleJson +  '<br /> <b>发送信息:</b>'  +jsonsendMsg +  '<br /> <b>异常描述:</b>'  +descriptionJson +  '</div>'
  		});    
 }
 
</script>
<script type="text/javascript" src="${contextPath}/resources/js/log/sms_email_log.js"></script>
</body>

</html>
 
